<!DOCTYPE html>
<html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script src="./echarts-5.4.3.min.js"></script>
<body>
<div id="chart"></div>
</body>
<script>
    const container = document.getElementById('chart')
    function init(width, height) {
        container.style.width = width;
        container.style.height = height;
        window.myChart = window.echarts.init(container);
        window.myChart.on('click', function(params) {
          window.ohosCallNative.callNative('click', {
            componentType: params.componentType,
            seriesType: params.seriesType,
            seriesIndex: params.seriesIndex,
            seriesName: params.seriesName,
            name: params.name,
            dataIndex: params.dataIndex,
            dataType: params.dataType,
            value: params.value,
            color: params.color,
          });
        });
    }
</script>
</html>